package com.example.demo.LeetCode.number;

public class Fib {
    public static int solution(int n ){
      if (n < 0){
          return 0;
      }
      if (n == 1){
          return 1;
      }
      if (n == 0){
          return 0;
      }
      return  test(n);
    }

    public static int test(int n ){
        if (n == 1) return  1;
        if (n == 0) return  0;
        return test(n - 1) + test(n - 2);
    }

    public static void main(String[] args) {
        int ans = solution(4);
        System.out.println(ans);
    }

}
